package gold.digger;

/**
 * Created by fanzhenyu02 on 2020/3/1.
 */
public class LC136 {
    public int singleNumber(int[] arr) {
        int ori = 0;
        for (int i = 0; i < arr.length; i++) {
            ori = ori ^ arr[i];
        }

        return ori;
    }

    public static void main(String[] args) {
        LC136 an = new LC136();
        int[] arr = {4, 1, 2, 1, 2};

        System.out.println(an.singleNumber(arr));
    }
}
